package com.whatisjee.ssf.misc;

import java.io.Serializable;
import java.util.Collections;
import java.util.List;

public class PagingList<T extends Serializable> implements Serializable {	
	private static final long serialVersionUID = -2950871070816156848L;

	@SuppressWarnings("unchecked")
	public static final PagingList EMPTY_LIST = new PagingList(0, Collections.EMPTY_LIST);
	
	private final int count;
	private final List<T> data;
	private final Object extra;
	
	public PagingList(int count, List<T> data, Object extra) {
		this.count = count;
		this.data = data;
		this.extra = extra;
	}
	
	public PagingList(int count, List<T> data) {
		this(count, data, null);
	}

	public int getCount() {
		return count;
	}

	public List<T> getData() {
		return data;
	}

	public Object getExtra() {
		return extra;
	}
}